In [5]:
%matplotlib inline
from __future__ import division
import pandas as pd
import sqlalchemy as sq
import matplotlib.pyplot as plt
In [23]:
engine = sq.create_engine('postgresql+pg8000://jdlara:Amadeus-2010@switch-db2.erg.berkeley.edu:5432/apl_cec?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory')
df_lemma = pd.read_sql_query('select "D_CONBM_kg" from lemma.lemma_crmort where ("D_CONBM_kg" > 1 and "D_CONBM_kg" < 60000)',engine)
In [24]:
plt.figure()
df_lemma.plot.hist(bins=30)
Out[24]:
In [25]:
df_lemma_high = pd.read_sql_query('select "D_CONBM_kg" from lemma.lemma_crmort where ("D_CONBM_kg" > 60000)',engine)
In [26]:
plt.figure()
df_lemma_high.plot.hist(bins=30)
Out[26]:
In [ ]: